/**
 * 提示框
 */
const msg = {
  warning: (message) => {
    msg.appendHtml('warning', message)
  },
  success: (message) => {
    msg.appendHtml('success', message)
  },
  error: (message) => {
    msg.appendHtml('error', message)
  },
  appendHtml: (type, message) => {
    const nameStr = `msg${Date.parse(new Date())}`
    const html = `<div class="${nameStr} msg-${type}">${message}</div>`
    $('body').append(html)
    setTimeout(() => {
      $(`.${nameStr}`).remove()
    }, 3000)
  }
}
